package com.example.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.sys.dao.SystemMenuMapper;
import com.example.sys.dto.SystemMenuDTO;
import com.example.sys.entity.SystemMenu;
import com.example.sys.service.ISystemMenuService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统菜单表 服务实现类
 * </p>
 *
 * @author ywh
 * @since 2024-12-25
 */
@Service
public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemMenu> implements ISystemMenuService {

    @Override
    public boolean saveMenuDTO(SystemMenuDTO menuDTO) {
        SystemMenu entity = new SystemMenu();
        BeanUtils.copyProperties(menuDTO, entity);
        return this.save(entity);
    }
}
